home *** CD-ROM | disk | FTP | other *** search
/ Multimedia Jumpstart / Multimedia Microsoft Jumpstart Version 1.1a (Microsoft).BIN / develpmt / drivers / mscdex / iscdrom / iscdrom.asm
Encoding:
Assembly Source File  |  1992-11-12  |  1.6 KB  |  35 lines

  1. ;     (C) Copyright Microsoft Corp. 1991.  All rights reserved.
  2. ;
  3. ;     You have a royalty-free right to use, modify, reproduce and 
  4. ;     distribute the Sample Files (and/or any modified version) in 
  5. ;     any way you find useful, provided that you agree that 
  6. ;     Microsoft has no warranty obligations or liability for any 
  7. ;     Sample Application Files which are modified. 
  8.  
  9. ;*--------------------------------------------------------------------------*
  10. ;*                                                                          *
  11. ;*  BOOL IsCDROMDrive(int iDrive)                                           *
  12. ;*                                                                          *
  13. ;*  Determine if passed drive is a CDROM drive controlled by MSCDEX.        *
  14. ;*  iDrive = drive index (0=A, 1=B, ...).                                   *
  15. ;*                                                                          *
  16. ;*  Return boolean.                                                         *
  17. ;*                                                                          *
  18. ;*--------------------------------------------------------------------------*
  19.  
  20. cProc IsCDROMDrive, <FAR, PUBLIC>
  21.  
  22. ParmW iDrive
  23.  
  24. cBegin
  25.             mov     ax,150Bh        ; MSCDEX driver check API
  26.             xor     bx,bx
  27.             mov     cx,iDrive
  28.             int     2Fh
  29.             cmp     bx,0ADADh       ; was MSCDEX the int 2F guy?
  30.             je      @f              ;    yes, AX != 0 if drive is a CDROM
  31.             xor     ax,ax           ;    no, can't be an MSCDEX CDROM drive
  32. @@:
  33. cEnd
  34.  
  35.